<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no"
    />
    <title>属性的操作</title>
    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    <style>
      .bd {
        border: 4px solid black;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <a href="https://www.baidu.com" target="_blank">
        <img src="./img/img1.jpg" alt="图片" width="100" class="bd" />
      </a>
      <div>
        <input type="radio" checked name="gender" value="1" onchange="handleChange(this)" />1
        <input type="radio" name="gender" value="2" onchange="handleChange(this)" />2
      </div>
    </div>
    <button onclick="updateSrc()">修改图片的src</button>
    <button onclick="removeClass()">移除img的class</button>
    <button onclick="getSrc()">获得图片的src</button>
    <script src="./js/attr.js"></script>
  </body>
</html>
